/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BittorentPackage;

import java.io.Serializable;

/**
 *
 * @author DongVan
 */
public class BittorentPackageMessage implements Serializable{
    private byte[] m_Type;
    private byte[] m_Flag;
    private byte[] m_HeaderLength;
    private byte[] m_PacketLength;
    private byte[] m_Checksum;
    private byte[] m_SequenceNumber;
    private byte[] m_AcknowledgeNumber;
    private String m_Option;
    private Object m_Data;


    public byte[] getM_AcknowledgeNumber() {
        return m_AcknowledgeNumber;
    }

    public void setM_AcknowledgeNumber(byte[] m_AcknowledgeNumber) {
        this.m_AcknowledgeNumber = m_AcknowledgeNumber;
    }

    public byte[] getM_Checksum() {
        return m_Checksum;
    }

    public void setM_Checksum(byte[] m_Checksum) {
        this.m_Checksum = m_Checksum;
    }

    public Object getM_Data() {
        return m_Data;
    }

    public void setM_Data(Object m_Data) {
        this.m_Data = m_Data;
    }

    public byte[] getM_Flag() {
        return m_Flag;
    }

    public void setM_Flag(byte[] m_Flag) {
        this.m_Flag = m_Flag;
    }

    public byte[] getM_HeaderLength() {
        return m_HeaderLength;
    }

    public void setM_HeaderLength(byte[] m_HeaderLength) {
        this.m_HeaderLength = m_HeaderLength;
    }

    public String getM_Option() {
        return m_Option;
    }

    public void setM_Option(String m_Option) {
        this.m_Option = m_Option;
    }

    public byte[] getM_PacketLength() {
        return m_PacketLength;
    }

    public void setM_PacketLength(byte[] m_PacketLength) {
        this.m_PacketLength = m_PacketLength;
    }

    public byte[] getM_SequenceNumber() {
        return m_SequenceNumber;
    }

    public void setM_SequenceNumber(byte[] m_SequenceNumber) {
        this.m_SequenceNumber = m_SequenceNumber;
    }

    public byte[] getM_Type() {
        return m_Type;
    }

    public void setM_Type(byte[] m_Type) {
        this.m_Type = m_Type;
    }
    
    public BittorentPackageMessage(){
        
    }
    
    public BittorentPackageMessage(byte[] type, byte[] flag, byte[] headerLength, byte[] packetLength, byte[] checksum, byte[] sequenceNumber, byte[] acknowledgeNumber, String option, Object data ) {
        this.m_Type = type;
        this.m_Flag = flag;
        this.m_HeaderLength = headerLength;
        this.m_PacketLength = packetLength;
        this.m_Checksum = checksum;
        this.m_SequenceNumber = sequenceNumber;
        this.m_AcknowledgeNumber = acknowledgeNumber;
        this.m_Option = option;
        this.m_Data = data;
        
    }
    
    public BittorentPackageMessage(String param_option, Object param_data){
        this.m_Type = new byte[1];
        this.m_Flag = new byte[1];
        this.m_HeaderLength = new byte[2];
        this.m_PacketLength = new byte[2];
        this.m_Checksum = new byte[2];
        this.m_SequenceNumber = new byte[4];
        this.m_AcknowledgeNumber = new byte[4];
        this.m_Option = param_option;
        this.m_Data = param_data;        
    }
}
